<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018-08-08
 * Time: 15:29
 */

namespace App\Http\Controllers\Task;


use App\Http\Controllers\Controller;
use App\Model\Account\Administration;

class ExpiredAccountController extends Controller
{
    public function updateAccount()
    {
        set_time_limit(0);
        //查询出来所有已经过期的中介公司 h_account_number_manager
        $accountId = Administration::getExpiredAccount();
        if ($accountId) {
            //循环里面公司的ID   修改该公司下面所有的账号为禁用
            foreach ($accountId as $k => $v){
                Administration::updateAllUserStatus($v);
            }
            echo '中介公司过期未续费，修改状态完成！';
        } else {
            echo '暂无过期公司需要修改状态！';
        }

    }
}